function value = LandConstraint(x)

global n pointIdentifiers
global maplegend WaterDepth DepthLimit

value = 0;
for i = 1:n+1
    depth = mapprofile(WaterDepth, maplegend, [pointIdentifiers(i, 1),...
        pointIdentifiers(i+1, 1)], [pointIdentifiers(i, 2),...
        pointIdentifiers(i+1, 2)]);
    HitLand = length(depth(depth>DepthLimit))/length(depth)*60.*...
        distance(pointIdentifiers(i, 1), pointIdentifiers(i, 2),...
        pointIdentifiers(i+1, 1), pointIdentifiers(i+1, 2));
    value = value + Hitland;
end